﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="uploadImages.aspx.cs" Inherits="Joyintech.Admin.inpiao365.core.uploadImages" %>

<%@ Register Src="~/checkRight.ascx" TagName="checkRight" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <base target="_self" />
    <script type="text/javascript" language="javascript">
        function InputChange(oInput) {
            var disp = 0;
            var s = oInput.value;
            var ext;
            if (s.length < 5)
                return;
            ext = s.substr(s.length - 3, 3).toLowerCase();
            if (ext == "jpg" || ext == "jpeg" || ext == "gif" || ext == "bmp" || ext == "png") {
                document.getElementById('previewRow').style.display = "";
                document.getElementById('preview').src = s;
            } else {
                document.getElementById('previewRow').style.display = "none";
                document.getElementById('preview').src = "../theme/empty.gif";
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="position">
        <span>上传文件</span>
    </div>
    <table cellspacing="5" cellpadding="0" border="0" align="center">
        <tr>
            <td id="previewRow" background="../theme/background.gif" style="background-repeat: no-repeat;
                background-position: center; height: 96px; width: 96px; text-align: center; vertical-align: middle;display:none"
                align="center">
                <img class="preview" src="../theme/empty.gif" alt="图片预览" name="preview" id="preview" width="96" />
            </td>
        </tr>
        <tr>
            <td style="text-align: center;">
                请选择上传的文件：<asp:FileUpload ID="FileUpload1" onchange="InputChange(this)"  runat="server" />
            </td>
        </tr>
        <tr>
            <td style="text-align: center;">
                <asp:Button ID="btnUpload" runat="server" CssClass="BigButton" Text="上传" onclick="btnUpload_Click" />
            </td>
        </tr>
    </table>
    <uc1:checkRight ID="checkRight1" runat="server" />
    </form>
</body>
</html>
